import 'package:get/get.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

abstract class BaseListController extends GetxController {
  final dataSource = [];
  int page = 1;
  bool isGridStyle = false;
  double ratio = 1.0;
  double spaceV = 10.0;
  double spaceH = 10.0;
  bool isLoading = true;
  int crossCount = 2;
  final isEnableRefresh = true;
  late final RefreshController refreshController;

  onReady() {
    super.onReady();
    fetchPageData();
  }

  fetchPageData({bool isRefresh = true, bool needLoading = false});

  instanceChildItem(int index) => UnimplementedError();
}

class ListBaseLogic extends GetxController with GetTickerProviderStateMixin {
  int currentPage = 1;
  RefreshController? refreshCtr;
  List<dynamic>? dataList;
}
